<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>


    let elementStyle = document.createElement('div').style

    let vendor = (() => {
      // 各个浏览器厂商的前缀
      let transformNames = {
        O: 'OTransform',
        standard: 'transform',
        ms: 'msTransform',
        webkit: 'webkitTransform',
        Moz: 'MozTransform',



      }

      for (let key in transformNames) {
        if (elementStyle[transformNames[key]] !== undefined) {
          return key
        }
      }

      // 如果都不满足，那这个浏览器肯定有毛病
      return false
    })()
    console.log(vendor);
  </script>
</body>

</html>